      SUBROUTINE SETUP
      RETURN
      END
C   HS74
      BLOCK DATA
      INCLUDE 'BLOCO.INC'
      INTEGER I,J
      DATA NAME/'HS74'/
      DATA (X(I),I=1,4)/ 2*1.D-5,2*0.D0/
      DATA N/ 4/ , NH/3/ , NG/10/
      DATA DEL0/0.10D0/ ,TAU0/1.D0/ ,TAU/.1D0/
      DATA (GUNIT(1,J),J=6,13)/8*1/,(GUNIT(3,I),I=6,13)/4*1,4*-1/,
     F     (GUNIT(2,I),I=6,13)/1,2,3,4,
     F     1,2,3,4/
     F     ,((GUNIT(I,J),I=1,3),J=0,5)/-1,0,0,-1,0,0,-1,0,0,-1,0,0,
     F     -1,0,0,-1,0,0/
      END
      SUBROUTINE EF(X,FX)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),FX
      FX=3.D0*X(1)*(1.D0+X(1)**2/3.D0)+2.D0*X(2)*(1.D0+X(2)**2/3.D0)
      RETURN
      END
      SUBROUTINE EGRADF(X,GRADF)
      INCLUDE 'FUCO.INC'
      DOUBLE PRECISION X(NX),GRADF(NX)
      ICGF=ICGF+1
      GRADF(1)= 3.D0*(1.D0+X(1)**2)
      GRADF(2)= 2.D0*(1.D0+X(2)**2)
      GRADF(3)= 0.D0
      GRADF(4)= 0.D0
      RETURN
      END
      SUBROUTINE EH(I,X,HXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),HXI
      CRES(I)=CRES(I)+1
      GOTO (100,200,300),I
  100 CONTINUE
      HXI=DSIN(-X(3)-.25D0)+DSIN(-X(4)-.25D0)+.8948D0-X(1)
      RETURN
  200 CONTINUE
      HXI=DSIN( X(3)-.25D0)+DSIN(X(3) -X(4)-.25D0)+.8948D0-X(2)
      RETURN
  300 CONTINUE
      HXI=DSIN( X(4)-.25D0)+DSIN(X(4) -X(3)-.25D0)+1.2948D0
      RETURN
      END
      SUBROUTINE EGRADH(I,X,GRADHI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),GRADHI(NX)
      CGRES(I)=CGRES(I)+1
      GOTO (100,200,300),I
  100 CONTINUE
      GRADHI(1)=-1.D0
      GRADHI(2)=0.D0
      GRADHI(3)=-DCOS(-X(3)-.25D0)
      GRADHI(4)=-DCOS(-X(4)-.25D0)
      RETURN
  200 CONTINUE
      GRADHI(1)= 0.D0
      GRADHI(2)=-1.D0
      GRADHI(3)= DCOS( X(3)-.25D0)+DCOS(X(3)-X(4)-.25D0)
      GRADHI(4)=-DCOS(X(3)-X(4)-.25D0)
      RETURN
  300 CONTINUE
      GRADHI(1)= 0.D0
      GRADHI(2)= 0.D0
      GRADHI(3)=-DCOS(X(4)-X(3)-.25D0)
      GRADHI(4)= DCOS(X(4)-.25D0)+DCOS(X(4)-X(3)-.25D0)
      RETURN
      END
      SUBROUTINE EG(I,X,GXI)
      INCLUDE 'FUCO.INC'
      INTEGER I
      DOUBLE PRECISION X(NX),UG(4),OG(4),GXI
      SAVE UG,OG
      DATA UG/2*0.D0,2*-.55D0/
      DATA OG/2*1.2D0,2*.55D0/
      IF ( GUNIT(1,I+NH) .EQ. -1 ) CRES(I+NH)=CRES(I+NH)+1
      IF(I .GT. 2)      GOTO 100
      IF(I .EQ. 1)      GXI=X(4)-X(3)+.55D0
      IF(I .EQ. 2)      GXI=X(3)-X(4)+.55D0
      RETURN
 100  CONTINUE
      IF(I .LE. 6)    GXI=X(I-2)-UG(I-2)
      IF(I .GT. 6)    GXI=-X(I-6)+OG(I-6)
      END
      SUBROUTINE EGRADG(I,X,GRADGI)
      INCLUDE 'FUCO.INC'
      INTEGER I,J
      DOUBLE PRECISION X(NX) ,GRADGI(NX)
      IF(I .GT. 2)    GOTO 100
      GRADGI(1)=0.D0
      GRADGI(2)=0.D0
      IF(I .EQ. 2)    GOTO  50
      GRADGI(3)=-1.D0
      GRADGI(4)= 1.D0
      RETURN
   50 CONTINUE
      GRADGI(3)= 1.D0
      GRADGI(4)=-1.D0
      RETURN
  100 CONTINUE
      DO      200      J=1,4
      GRADGI(J)=0.D0
  200 CONTINUE
      IF(I .LE. 6)       GRADGI(I-2)=1.D0
      IF(I .GT. 6)       GRADGI(I-6)=-1.D0
      RETURN
      END


